import config from '../utils/config'

export const fileUpload = (file,header) => {
	return new Promise((resolve, reject) => {
		uni.uploadFile({
			url: `${config.host}/sys/upload/fileUpload`,
			filePath: file,
			name: "file",
			formData: {},
			header: header,
			success: res => resolve(res),
			fail: err => reject(err)
		});
	})
}
